using System;
using System.Collections.Generic;
using System.Text;
using SwinMessengerLibrary;

namespace SwinMessengerConsoleApp
{
    class HelpCommand:SwinMessengerCommand
    {
        /// <summary>
        /// This is the help command, it will give some help to the user if they get stuck in using SwinMessengerConsoleApp
        /// </summary>
        public HelpCommand()
            : base(new string[] { "help"})
        {
        }
        /// <summary>
        /// This executes the help command
        /// </summary>
        /// <param name="runOn">The server to run the help command on</param>
        /// <param name="parameters">the parameters of the help command</param>
        /// <returns>what the help command will print to the scrren</returns>
        public override List<string> Execute(Server runOn, string[] parameters)
        {
            List<string> tempList = new List<string>();
            tempList.Add("To view your contacts type 'roster'");
            tempList.Add("This will display a the contact's number, then the contact's id and then the contact's status");
            tempList.Add("");
            tempList.Add("To send a message type the 'msg' or 'message' then the contact's number then the message you want to send");
            tempList.Add("An example is 'msg 5 Hi Fred'");
            tempList.Add("");
            tempList.Add("Recived messages will first have 'Message from:' then the contact's id, then on the next line will be a '-' then the message");
            tempList.Add("An example");
            tempList.Add("Message from: fred@gmail.com");
            tempList.Add("- Hi Bob");
            tempList.Add("");
            tempList.Add("To quit type 'logout' or 'quit'");
            return tempList;
        }
    }
}
